import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router);

export default new Router({

  routes: [
    {
      path: '/',
      meta: {title: ''},
      component: (resolve) => require(['@/components/login/login.vue'], resolve)
    },
    {
      path: '/login',
      meta: {title: ''},
      component: (resolve) => require(['@/components/login/login.vue'], resolve)
    },
    {
      path: '/index',
      meta: {title: ''},
      component: (resolve) => require(['@/components/index.vue'], resolve),
      children:[
        {
          path: '/',
          component: (resolve) => require(['@/components/Coupons/couponsSend.vue'], resolve)
        },
        {
          path: '/couponsSend',
          component: (resolve) => require(['@/components/Coupons/couponsSend.vue'], resolve)
        },
        {
          path: '/couponsList',
          component: (resolve) => require(['@/components/Coupons/couponsList.vue'], resolve)
        },
        {
          path: '/couponsDetails',
          component: (resolve) => require(['@/components/Coupons/couponsDetails.vue'], resolve)
        },
        {
          path: '/messageSend',
          component: (resolve) => require(['@/components/Message/messageSend.vue'], resolve)
        },
        {
          path: '/messageList',
          component: (resolve) => require(['@/components/Message/messageList.vue'], resolve)
        },
        {
          path: '/messageDetails',
          component: (resolve) => require(['@/components/Message/messageDetails.vue'], resolve)
        },
        {
          path: '/appECouponList',
          component: (resolve) => require(['@/components/myConpons/myConpons.vue'], resolve)
        }
      ]
    }

  ]
})
